1. Technical Field
This invention relates to a method for modifying a logical expression. More specifically, the method automates placement of a new node to a parent node that supports at least three connecting nodes.
2. Description of the Prior Art
Data structures in the form of trees are known as efficient tools for building tables and supporting searches beginning with a known prefix. A tree is a data structure accessed first at the root node. Each subsequent node can be either an internal node with further subsequent nodes or an external node with no further nodes existing under the node. An internal node refers to or has links to one or more descending or child nodes and is referred to as the parent of its child nodes, and external nodes are commonly referred to as leaves. The root node is usually depicted at the top of the tree structure and the external nodes are depicted at the bottom.
Tree structures are often defined by the characteristics of the tree. For example, a Binary Tree is a tree with at most two children for each node. A Digital Tree is a rooted tree where the leaves represent strings of digital symbols. The Patricia Tree is a Digital Tree with suppression of one way branching that prohibits keys which are strict prefixes of other branches. In general, a Patricia tree is always a digital tree, but only a binary tree when the symbol alphabet is binary. The internal nodes represent a common prefix to a set of strings, and each child of that node corresponds to a choice of the next symbol to follow the common prefix. A Patricia Tree can take the form of a Binary Tree and a Digital Tree where all internal nodes have at least two children.
Problems arise in adding leaves to the tree structure. In a Binary Tree where there is at most two children for each node, adding a leaf to the tree is straight forward. However, problems arise in a multiple node tree which supports more than two child nodes for each parent node. Prior art methods for modifying a tree structure that supports more than two children per node require a person to specify whether it is an operation to add a binary operator or to add a node to the tree. However, this method is time consuming as the person must select the location and operator for each child node to be added to the tree structure. Therefore, there is a need that supports automating placement of a new node in a tree structure that support more than two children per node.